version: '3.9'

# sudo service postgresql stop
# sudo docker-compose up

services:
  db:
    container_name: db_wissen_users
    ports:
      - "5432:5432"
    environment:
     - POSTGRES_PASSWORD=root
     - POSTGRES_USER=admin
     - POSTGRES_DB=my_db
    volumes:
      - ./postgres_data:/var/lib/data/postgresql/data
    image: postgres:14.3-alpine
  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-noemail@noemail.com}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-root}
    ports:
      - "5050:80"
